home *** CD-ROM | disk | FTP | other *** search
- #!/usr/local/bin/wish -file
-
- #
- # $Id: msgDialog,v 1.3 1993/11/16 22:19:22 jason Exp $
- #
-
- set TkGnats(lib) ./; ##TKGNATSLIB##
-
- proc Lc {s} {return $s}
-
- proc msgDialog {w msg} {
- global TkGnats
- catch {destroy $w}
- frame $w -relief raised -borderwidth 4
-
- frame $w.m
- label $w.m.label -bitmap @$TkGnats(lib)/info.xbm
- message $w.m.msg -borderwidth 3 -relief sunken -text $msg -aspect 99999
- pack append $w.m $w.m.label {left} $w.m.msg {right padx 12 pady 12}
-
- frame $w.bar
- button $w.bar.ok -text [Lc "OK"] -command "exit 0"
- pack append $w.bar \
- $w.bar.ok {bottom padx 8 pady 8}
- pack append $w \
- $w.m {top} \
- $w.bar {bottom fillx}
- ## bind $w <Visibility> { grab -global %W; focus %W }
- pack append . $w {expand fill}
- }
- set exitVal 0
- wm title . "Information"
- set msg ""
- foreach m $argv {append msg "$m\n"}
- msgDialog .msgDialog $msg
- wm geometry . [format "+%s+%s" \
- +[expr "[winfo vrootx .]+([winfo screenwidth .]/2)-([winfo reqwidth .]/2)"] \
- +[expr "[winfo vrooty .]+([winfo screenheight .]/2)-([winfo reqheight .]/2)"]]
- tkwait window .msgDialog
- # destroy . ; # for older tk versions
- exit $exitVal
-